var _user = _interopRequireDefault(require("../../public/utils/user"));

function _interopRequireDefault(e) {
    return e && e.__esModule ? e : {
        default: e
    };
}

Component({
    properties: {
        isShown: {
            value: !1,
            type: Boolean
        },
        useWechat: {
            type: Boolean,
            value: !0
        }
    },
    ready: function() {
        var t = this;
        _user.default.getTokens().then(function() {
            var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "";
            return t.setData({
                tokens: e
            });
        });
    },
    data: {
        source: "weApp",
        isShown: !1,
        tokens: {},
        binding: !1,
        mobile: "",
        countDown: 0,
        verifycode: ""
    },
    methods: {
        onMobileFail: function(e) {
            var t = e.detail.value;
            wx.showToast({
                title: t,
                image: "/components/authorize-mobile/images/bad-toast.png",
                duration: 3e3
            });
        },
        submit: function() {
            var e = this.selectComponent("#mobile").getFormData();
            e && this.triggerEvent("submit", e);
        },
        colseDialog: function() {
            this.setData({
                isShown: !1
            });
        }
    }
});